//
//  MyNotification.m
//  DriverBus
//
//  Created by MacMini20170218 on 2017/3/31.
//  Copyright © 2017年 JiYang. All rights reserved.
//

#import "MyNotification.h"
#import "AppDelegate.h"

@implementation MyNotification

// 设置本地通知
+ (void)sendNotification:(NSString*)title content:(NSString *)content{
    //创建通知
    UILocalNotification *localNoti = [UILocalNotification new];
    //设置通知内容
    localNoti.alertTitle = title;
    localNoti.alertBody = content;
    localNoti.soundName = UILocalNotificationDefaultSoundName;
    localNoti.applicationIconBadgeNumber = 1;
    localNoti.timeZone = [NSTimeZone defaultTimeZone];
    //立即发出通知
    [[UIApplication sharedApplication] presentLocalNotificationNow:localNoti];
}
@end
